<?php
/**
 * @package		Joomla.Site
 * @subpackage	mod_menu
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access.
defined('_JEXEC') or die;
	$app = JFactory::getApplication();
	$templatepath = JURI::base() . 'templates/' . $app->getTemplate();
	$user		= JFactory::getUser();
// Note. It is important to remove spaces between elements.
$itemid = JRequest::getVar('Itemid');
$option = JRequest::getVar('option'); 
$view = JRequest::getVar('view');
$user = JFactory::getUser();
//$template = JRequest::getVar('template','mwc');
$template = $app->getTemplate();
$isProfile = ($option=='com_users' && $view=='profile');
?>

<script>
 function logout()
 {
	 
	 jQuery('#login-form').submit();
 }
</script>
<?php if(!$user->guest): ?>
<ul id="lstLogin">
	<li><a class="<?php echo $template=='mwc'?'active':'';?>" href="<?php echo JRoute::_('index.php?option=com_content&view=featured&Itemid=101', false)?>">Home</a></li>
	<li><a class="<?php echo ($template=='login' && !$isProfile)?'active':'';?>" href="<?php echo JRoute::_('index.php?option=com_content&view=featured&template=login&Itemid=218', false)?>">Partner Community</a></li>
	<li><a class="<?php echo $isProfile?'active':'';?>" href="<?php echo JRoute::_('index.php?option=com_users&view=profile&layout=edit&template=login', false)?>">My Account</a></li>
	<li><a href="javascript:void(0)" onclick="logout()">Log out</a></li>
</ul>
<?php endif; ?>
